﻿using System;
using System.Runtime.Serialization;
using Loki.Utils;

namespace Luna.Data
{
    /// <summary>
    /// Base database provider exception class.
    /// </summary>
    [Serializable]
    public class DataException : LokiException
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DataException"/> class.
        /// </summary>
        public DataException()
            : base()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DataException"/> class.
        /// </summary>
        /// <param name="P_Message">The code.</param>
        public DataException(string P_Message)
            : base(P_Message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DataException"/> class.
        /// </summary>
        /// <param name="P_Message">The code.</param>
        /// <param name="P_InnerException">The inner exception.</param>
        public DataException(string P_Message, Exception P_InnerException)
            : base(P_Message, P_InnerException)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DataException"/> class.
        /// </summary>
        /// <param name="P_Info">The info.</param>
        /// <param name="P_Context">The context.</param>
        public DataException(SerializationInfo P_Info, StreamingContext P_Context)
            : base(P_Info, P_Context)
        {
        }
    }
}
